/* eslint-disable */
/* tslint:disable */
/*
 * ---------------------------------------------------------------
 * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API        ##
 * ##                                                           ##
 * ## AUTHOR: acacode                                           ##
 * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
 * ---------------------------------------------------------------
 */

import { createRequest } from "@/request/index";

import { baseUrl, Order } from "./data-contracts";

export class StoreClass {
  /**
   * No description
   *
   * @tags store
   * @name PlaceOrder
   * @summary Place an order for a pet
   * @request POST:/store/order
   * @response `200` `Order` successful operation
   * @response `400` `void` Invalid Order
   */
  static placeOrder = (body: Order, loading?: boolean) =>
    createRequest<Order>({
      url: baseUrl + `/store/order`,
      method: "POST",
      loading,
      data: body,
    });
  /**
   * @description For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
   *
   * @tags store
   * @name GetOrderById
   * @summary Find purchase order by ID
   * @request GET:/store/order/{orderId}
   * @response `200` `Order` successful operation
   * @response `400` `void` Invalid ID supplied
   * @response `404` `void` Order not found
   */
  static getOrderById = (orderId: number, loading?: boolean) =>
    createRequest<Order>({
      url: baseUrl + `/store/order/${orderId}`,
      method: "GET",
      loading,
    });
  /**
   * @description For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
   *
   * @tags store
   * @name DeleteOrder
   * @summary Delete purchase order by ID
   * @request DELETE:/store/order/{orderId}
   * @response `400` `void` Invalid ID supplied
   * @response `404` `void` Order not found
   */
  static deleteOrder = (orderId: number, loading?: boolean) =>
    createRequest<any>({
      url: baseUrl + `/store/order/${orderId}`,
      method: "DELETE",
      loading,
    });
  /**
   * @description Returns a map of status codes to quantities
   *
   * @tags store
   * @name GetInventory
   * @summary Returns pet inventories by status
   * @request GET:/store/inventory
   * @secure
   * @response `200` `Record<string, number>` successful operation
   */
  static getInventory = (loading?: boolean) =>
    createRequest<Record<string, number>>({
      url: baseUrl + `/store/inventory`,
      method: "GET",
      loading,
    });
}
